package me.haoliang.controller

import javax.annotation.Resource

import me.haoliang.entity.TraUser
import me.haoliang.service.impl.UserService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.{RequestMapping, ResponseBody, RestController}

/**
  * author: planck 
  * createTime: 2016/10/18.
  */
@RestController
@RequestMapping(Array("/hello"))
class HelloController @Autowired()(val userService: UserService) {

  @RequestMapping(Array("/index"))
  def HelloWorld(): java.util.List[TraUser] = {
    userService.queryList()
  }
}
